// local to local tool

package com.smart.utils {

	public class StringUtils {
	
		public static function ellipsed ( str:String, limit:int ) : String {
		
			var return_string:String;
		
			// if lenght is short enough, no need to truncate 
			if ( str.length < limit ) {
				return_string = str; 
			} else {				
				return_string = str.substr(0,limit-3); 
				return_string += "...";
			}
			
			return return_string; 
			
		}
	}
}